home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / plymrpht / polymorp.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-05-28  |  15.9 KB  |  466 lines

  1. VERSION 5.00
  2. Object = "{FCF7C825-F618-11D1-BAFA-444553540000}#1.0#0"; "POLYMORPH.OCX"
  3. Begin VB.Form PolyMorphDemo 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "PolyMorph Demonstration Application"
  6.    ClientHeight    =   5595
  7.    ClientLeft      =   885
  8.    ClientTop       =   1125
  9.    ClientWidth     =   8655
  10.    Icon            =   "PolyMorphDemo.frx":0000
  11.    LinkTopic       =   "Form2"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   5595
  14.    ScaleWidth      =   8655
  15.    StartUpPosition =   2  'CenterScreen
  16.    Begin VB.CommandButton Command5 
  17.       Caption         =   "More Info"
  18.       Height          =   420
  19.       Left            =   1455
  20.       TabIndex        =   37
  21.       Top             =   5145
  22.       Width           =   975
  23.    End
  24.    Begin VB.CommandButton Command4 
  25.       Caption         =   "&About"
  26.       Height          =   420
  27.       Left            =   2670
  28.       TabIndex        =   36
  29.       Top             =   5025
  30.       Width           =   975
  31.    End
  32.    Begin VB.CommandButton Command3 
  33.       Caption         =   "&Done"
  34.       Height          =   420
  35.       Left            =   3885
  36.       TabIndex        =   35
  37.       Top             =   5145
  38.       Width           =   975
  39.    End
  40.    Begin VB.Frame frame69 
  41.       Caption         =   "Property Sheet for Sample PolyText Control"
  42.       Height          =   3900
  43.       Left            =   45
  44.       TabIndex        =   2
  45.       Top             =   1065
  46.       Width           =   6345
  47.       Begin VB.OptionButton Option1 
  48.          Caption         =   "Behaviour"
  49.          Height          =   360
  50.          Left            =   90
  51.          Style           =   1  'Graphical
  52.          TabIndex        =   4
  53.          Top             =   255
  54.          Value           =   -1  'True
  55.          Width           =   1185
  56.       End
  57.       Begin VB.OptionButton Option2 
  58.          Caption         =   "Validation"
  59.          Height          =   360
  60.          Left            =   1305
  61.          Style           =   1  'Graphical
  62.          TabIndex        =   3
  63.          Top             =   255
  64.          Width           =   1185
  65.       End
  66.       Begin VB.Frame Frame1 
  67.          Caption         =   "Behaviour"
  68.          Height          =   3240
  69.          Left            =   75
  70.          TabIndex        =   5
  71.          Top             =   600
  72.          Width           =   6210
  73.          Begin VB.ComboBox txtButton_Style 
  74.             Height          =   315
  75.             ItemData        =   "PolyMorphDemo.frx":030A
  76.             Left            =   1485
  77.             List            =   "PolyMorphDemo.frx":031A
  78.             Style           =   2  'Dropdown List
  79.             TabIndex        =   13
  80.             Top             =   300
  81.             Width           =   2715
  82.          End
  83.          Begin VB.ComboBox txtOn_Entry 
  84.             Height          =   315
  85.             ItemData        =   "PolyMorphDemo.frx":0366
  86.             Left            =   1470
  87.             List            =   "PolyMorphDemo.frx":0373
  88.             Style           =   2  'Dropdown List
  89.             TabIndex        =   12
  90.             Top             =   975
  91.             Width           =   2700
  92.          End
  93.          Begin VB.CheckBox chkShowErrors 
  94.             Alignment       =   1  'Right Justify
  95.             Caption         =   "ShowErrors"
  96.             Height          =   285
  97.             Left            =   150
  98.             TabIndex        =   11
  99.             ToolTipText     =   "Highlight Content if data is invalid"
  100.             Top             =   2490
  101.             Value           =   1  'Checked
  102.             Width           =   1290
  103.          End
  104.          Begin VB.TextBox txtMsgError 
  105.             Height          =   330
  106.             Left            =   1470
  107.             TabIndex        =   10
  108.             Top             =   2055
  109.             Width           =   2700
  110.          End
  111.          Begin VB.CheckBox chkShow_Time 
  112.             Alignment       =   1  'Right Justify
  113.             Caption         =   "Show Time"
  114.             Height          =   285
  115.             Left            =   375
  116.             TabIndex        =   9
  117.             ToolTipText     =   "Show a time selection on the Date Pop-up"
  118.             Top             =   630
  119.             Width           =   1290
  120.          End
  121.          Begin VB.TextBox txtToolTipText 
  122.             Height          =   330
  123.             Left            =   1470
  124.             TabIndex        =   8
  125.             Top             =   1680
  126.             Width           =   2700
  127.          End
  128.          Begin VB.CheckBox chkAutoComplete 
  129.             Alignment       =   1  'Right Justify
  130.             Caption         =   "AutoComplete"
  131.             Height          =   285
  132.             Left            =   150
  133.             TabIndex        =   7
  134.             ToolTipText     =   "Find closest match in the list"
  135.             Top             =   2850
  136.             Width           =   1290
  137.          End
  138.          Begin VB.TextBox txtDisplayFormat 
  139.             Height          =   330
  140.             Left            =   1470
  141.             TabIndex        =   6
  142.             Top             =   1320
  143.             Width           =   2700
  144.          End
  145.          Begin VB.Label lblButton_Style 
  146.             Caption         =   "Button Style:"
  147.             Height          =   240
  148.             Left            =   150
  149.             TabIndex        =   18
  150.             ToolTipText     =   "Which buttons do you want to use"
  151.             Top             =   330
  152.             Width           =   2700
  153.          End
  154.          Begin VB.Label lblMsgError 
  155.             Caption         =   "Error Text"
  156.             Height          =   240
  157.             Left            =   150
  158.             TabIndex        =   17
  159.             ToolTipText     =   "Text to Msg if invalid . Leave blank for no message"
  160.             Top             =   2100
  161.             Width           =   2700
  162.          End
  163.          Begin VB.Label lblToolTipText 
  164.             Caption         =   "ToolTipText:"
  165.             Height          =   240
  166.             Left            =   150
  167.             TabIndex        =   16
  168.             ToolTipText     =   "Tooltip"
  169.             Top             =   1770
  170.             Width           =   2700
  171.          End
  172.          Begin VB.Label lblDisplayFormat 
  173.             Caption         =   "DisplayFormat:"
  174.             Height          =   240
  175.             Left            =   150
  176.             TabIndex        =   15
  177.             ToolTipText     =   "Standard VB Format$ for displaying content"
  178.             Top             =   1365
  179.             Width           =   2700
  180.          End
  181.          Begin VB.Label lblOn_Entry 
  182.             Caption         =   "On_Entry:"
  183.             Height          =   240
  184.             Left            =   150
  185.             TabIndex        =   14
  186.             ToolTipText     =   "Cursor Position when control gets focus"
  187.             Top             =   1005
  188.             Width           =   2700
  189.          End
  190.       End
  191.       Begin VB.Frame Frame2 
  192.          Caption         =   "Validation"
  193.          Height          =   3240
  194.          Left            =   75
  195.          TabIndex        =   19
  196.          Top             =   600
  197.          Width           =   6210
  198.          Begin VB.ComboBox txtData_Type 
  199.             Height          =   315
  200.             ItemData        =   "PolyMorphDemo.frx":03BB
  201.             Left            =   1410
  202.             List            =   "PolyMorphDemo.frx":03DA
  203.             Style           =   2  'Dropdown List
  204.             TabIndex        =   30
  205.             Top             =   300
  206.             Width           =   2700
  207.          End
  208.          Begin VB.CheckBox chkRequired 
  209.             Alignment       =   1  'Right Justify
  210.             Caption         =   "Required"
  211.             Height          =   285
  212.             Left            =   135
  213.             TabIndex        =   29
  214.             Top             =   720
  215.             Width           =   1500
  216.          End
  217.          Begin VB.TextBox txtMin 
  218.             Height          =   330
  219.             Left            =   1410
  220.             TabIndex        =   28
  221.             Top             =   1905
  222.             Width           =   960
  223.          End
  224.          Begin VB.TextBox txtMax 
  225.             Height          =   330
  226.             Left            =   1410
  227.             TabIndex        =   27
  228.             Top             =   1425
  229.             Width           =   960
  230.          End
  231.          Begin VB.TextBox txtMaxLength 
  232.             Height          =   330
  233.             Left            =   1410
  234.             TabIndex        =   26
  235.             Top             =   1005
  236.             Width           =   960
  237.          End
  238.          Begin VB.CheckBox chkLocked 
  239.             Alignment       =   1  'Right Justify
  240.             Caption         =   "Locked"
  241.             Height          =   285
  242.             Left            =   105
  243.             TabIndex        =   25
  244.             Top             =   2280
  245.             Width           =   1500
  246.          End
  247.          Begin VB.Frame Frame4 
  248.             Caption         =   "List Items"
  249.             Height          =   2055
  250.             Left            =   2490
  251.             TabIndex        =   20
  252.             Top             =   1020
  253.             Width           =   3345
  254.             Begin VB.CommandButton Command1 
  255.                Caption         =   "Clear"
  256.                Height          =   300
  257.                Left            =   105
  258.                TabIndex        =   24
  259.                Top             =   285
  260.                Width           =   780
  261.             End
  262.             Begin VB.CommandButton Command2 
  263.                Caption         =   "Add"
  264.                Height          =   300
  265.                Left            =   930
  266.                TabIndex        =   23
  267.                Top             =   285
  268.                Width           =   780
  269.             End
  270.             Begin VB.ListBox List1 
  271.                Height          =   1230
  272.                Left            =   105
  273.                TabIndex        =   22
  274.                Top             =   675
  275.                Width           =   3135
  276.             End
  277.             Begin VB.CheckBox chkLimitToList 
  278.                Alignment       =   1  'Right Justify
  279.                Caption         =   "LimitToList"
  280.                Height          =   285
  281.                Left            =   1740
  282.                TabIndex        =   21
  283.                Top             =   300
  284.                Width           =   1500
  285.             End
  286.          End
  287.          Begin VB.Label lblMin 
  288.             Caption         =   "Min:"
  289.             Height          =   240
  290.             Left            =   135
  291.             TabIndex        =   34
  292.             Top             =   1965
  293.             Width           =   2700
  294.          End
  295.          Begin VB.Label lblMax 
  296.             Caption         =   "Max:"
  297.             Height          =   240
  298.             Left            =   135
  299.             TabIndex        =   33
  300.             Top             =   1485
  301.             Width           =   2700
  302.          End
  303.          Begin VB.Label lblData_Type 
  304.             Caption         =   "Data_Type:"
  305.             Height          =   240
  306.             Left            =   135
  307.             TabIndex        =   32
  308.             Top             =   375
  309.             Width           =   2700
  310.          End
  311.          Begin VB.Label lblMaxLength 
  312.             Caption         =   "MaxLength:"
  313.             Height          =   240
  314.             Left            =   135
  315.             TabIndex        =   31
  316.             Top             =   1080
  317.             Width           =   2700
  318.          End
  319.       End
  320.    End
  321.    Begin VB.Frame Frame3 
  322.       Caption         =   "Sample PolyText"
  323.       Height          =   765
  324.       Left            =   105
  325.       TabIndex        =   0
  326.       Top             =   180
  327.       Width           =   5010
  328.       Begin PolyMorph.PolyText PolyText1 
  329.          Height          =   330
  330.          Left            =   105
  331.          TabIndex        =   38
  332.          Top             =   300
  333.          Width           =   4800
  334.          _ExtentX        =   8467
  335.          _ExtentY        =   582
  336.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  337.             Name            =   "MS Sans Serif"
  338.             Size            =   8.25
  339.             Charset         =   0
  340.             Weight          =   400
  341.             Underline       =   0   'False
  342.             Italic          =   0   'False
  343.             Strikethrough   =   0   'False
  344.          EndProperty
  345.          AutoComplete    =   0   'False
  346.          ShowErrors      =   -1  'True
  347.          ListIndex       =   -1
  348.       End
  349.    End
  350.    Begin VB.Image Image1 
  351.       BorderStyle     =   1  'Fixed Single
  352.       Height          =   1575
  353.       Left            =   6570
  354.       Picture         =   "PolyMorphDemo.frx":043B
  355.       Top             =   150
  356.       Width           =   1980
  357.    End
  358.    Begin VB.Label Label1 
  359.       Alignment       =   2  'Center
  360.       BackStyle       =   0  'Transparent
  361.       BorderStyle     =   1  'Fixed Single
  362.       Caption         =   $"PolyMorphDemo.frx":2DB5
  363.       Height          =   3615
  364.       Left            =   6465
  365.       TabIndex        =   1
  366.       Top             =   1800
  367.       Width           =   2160
  368.    End
  369. Attribute VB_Name = "PolyMorphDemo"
  370. Attribute VB_GlobalNameSpace = False
  371. Attribute VB_Creatable = False
  372. Attribute VB_PredeclaredId = True
  373. Attribute VB_Exposed = False
  374. Private Sub chkAutoComplete_Click()
  375. PolyText1.AutoComplete = chkAutoComplete
  376. End Sub
  377. Private Sub chkLimitToList_Click()
  378. PolyText1.LimitToList = chkLimitToList
  379. End Sub
  380. Private Sub chkLocked_Click()
  381. PolyText1.Locked = chkLocked
  382. End Sub
  383. Private Sub chkRequired_Click()
  384. PolyText1.Required = chkRequired.Value
  385. End Sub
  386. Private Sub chkShow_Time_Click()
  387. PolyText1.Show_Time = chkShow_Time
  388. End Sub
  389. Private Sub chkShowErrors_Click()
  390. PolyText1.ShowErrors = chkShowErrors
  391. End Sub
  392. Private Sub Command1_Click()
  393. PolyText1.Clear
  394. List1.Clear
  395. End Sub
  396. Private Sub Command2_Click()
  397. 'On Error Resume Next
  398. X = InputBox("Enter the value to add to the list")
  399. If X = "" Or Trim(X) = "" Then Exit Sub
  400. PolyText1.AddItem X
  401. List1.AddItem X
  402. End Sub
  403. Private Sub Command3_Click()
  404. End Sub
  405. Private Sub Command4_Click()
  406. frmAbout.Show 1
  407. End Sub
  408. Private Sub Command5_Click()
  409. frmMore.Show 1
  410. End Sub
  411. Private Sub Form_Load()
  412. txtButton_Style.ListIndex = 2
  413. txtData_Type.ListIndex = 8
  414. End Sub
  415. Private Sub Option1_Click()
  416. If Option1.Value Then
  417.     Frame1.ZOrder
  418.     Frame2.ZOrder
  419. End If
  420. End Sub
  421. Private Sub Option2_Click()
  422. If Option1.Value Then
  423.     Frame1.ZOrder
  424.     Frame2.ZOrder
  425. End If
  426. End Sub
  427. Private Sub PolyText1_ButtonClick()
  428. MsgBox ("If you do not add anything into the PolyText's List but choose to display the drop button a ButtonClick event will be generated(This message is being generated in this demo during the ButtonClick event!). This enables you to implement your own user-interface over a standard PolyText control. To create a list, see the Validation sheet."), , "PolyText Demo"
  429. End Sub
  430. Private Sub txtButton_Style_Click()
  431. PolyText1.Button_Style = txtButton_Style.ListIndex
  432. If PolyText1.Button_Style > 1 And txtData_Type.ListIndex = 8 Then
  433.     chkShow_Time.Enabled = True
  434.     chkShow_Time.Enabled = False
  435. End If
  436. End Sub
  437. Private Sub txtData_Type_Click()
  438. PolyText1.Data_Type = txtData_Type.ListIndex
  439. txtButton_Style_Click
  440. End Sub
  441. Private Sub txtDisplayFormat_Change()
  442. On Error Resume Next
  443. PolyText1.DisplayFormat = txtDisplayFormat
  444. End Sub
  445. Private Sub txtMax_Change()
  446. On Error Resume Next
  447. PolyText1.Max = Val(txtMax.Text)
  448. End Sub
  449. Private Sub txtMaxLength_Change()
  450. On Error Resume Next
  451. PolyText1.MaxLength = Val(txtMaxLength.Text)
  452. End Sub
  453. Private Sub txtMin_Change()
  454. On Error Resume Next
  455. PolyText1.Min = Val(txtMin.Text)
  456. End Sub
  457. Private Sub txtMsgError_Change()
  458. PolyText1.MsgError = txtMsgError
  459. End Sub
  460. Private Sub txtOn_Entry_Click()
  461. PolyText1.On_Entry = txtOn_Entry.ListIndex
  462. End Sub
  463. Private Sub txtToolTipText_Change()
  464. PolyText1.ToolTipText = txtToolTipText
  465. End Sub
  466.